import json


# 读取json数据的方法
class ReadUtil:
    @classmethod
    def read_config(cls, file_path, key):
        with open(file_path, "r", encoding="utf-8") as f:
            data = json.load(f).get(key)
            list1 = []
            for i in data:
                temp = tuple(i.values())
                list1.append(temp)
            return list1


if __name__ == '__main__':
    result = ReadUtil.read_config("../data/register_login.json", "image_code")
    print(result)
